<?
	class User extends DB
	{
		function __construct($other_conn=null)
		{
			parent::__construct(Tuser,$other_conn);
			$this->table=Tuser;
		}		
		function update_last_login_time($id)
		{
			$vardate=time();
			$this->add('login_count',1,'id',$id);
			$arr=array(
				'last_login_time'=>date('Y-m-d H:i:s'),
			);
			$this->update($arr,'id',$id);
			return true;
		}
		function check_sign($user,$pwd)
		{	
			$result = $this->query("SELECT password FROM $this->table WHERE username = '" . $user . "'");
			$row = $this->fetch_row($result);
			//yell($row[0].' '.md5($pwd));
			if(md5($pwd)==$row[0])return true;
			return false;
		}
	}

// class Admin
